package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDate;

/**
 * 登录日志类
 */
@Data
@ApiModel(value = "登录日志类")
@TableName("t_loginrecord")
public class LoginRecordBean {
    /*
    （日志编号，日期（当前时间），内容）
     */
    @ApiModelProperty(hidden = true)
    @TableId(value = "pk_loginRecordId",type = IdType.AUTO)
    private Integer id;
    @ApiModelProperty(value = "日期")
    @TableField("l_createDate")
    private LocalDate createDate = LocalDate.now();
    @ApiModelProperty(value = "内容")
    @TableField("l_content")
    private String content;

    public LoginRecordBean() {
    }

    public LoginRecordBean(String content) {
        this.content = content;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public LocalDate getCreateDate() {
        return createDate;
    }

    public void setCreateDate(LocalDate createDate) {
        this.createDate = createDate;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Override
    public String toString() {
        return "\nLoginRecordBean{" +
                "id=" + id +
                ", createDate=" + createDate +
                ", content='" + content + '\'' +
                '}';
    }
}
